using System;
using System.Collections.Generic;
using System.Text;
using AAM.BIZ;
using AAM;

namespace CMS.BIZ
{
    [DatabaseTable(TableName="Downloads", TableAlias="dwl")]
    public class BizDownload : BizObject
    {
        //todo made the BizDownloadFile class (BizDownloadFile and BizDownloadFolder must in
        public static readonly ObjectType ObjectType = new ObjectType("BizDownload");

        private int downloadID = 0;
        private string fileName = "";
        private string fileDescription = "";
        private string filePath = "";
        private DateTime uploadDate = DateTime.Now;
        private int? uploaderID = null;
        private int? parentFolderID = null;

        public BizDownload()
            : base(ObjectType, new object[]{0})
        {
        }

        [DatabaseRow(PrimaryKey=true,Identity=true)]
        public int DownloadID
        {
            get { return downloadID; }
            set { downloadID = value; ID[0] = value; }
        }
        [DatabaseRow()]
        public string FileName
        {
            get { return fileName; }
            set { fileName = value; }
        }
        [DatabaseRow()]
        public string FileDescription
        {
            get { return fileDescription; }
            set { fileDescription = value; }
        }
        [DatabaseRow()]
        public string FilePath
        {
            get { return filePath; }
            set { filePath = value; }
        }
        [DatabaseRow()]
        public int? ParentFolderID
        {
            get { return parentFolderID; }
            set { parentFolderID = value; }
        }
        [DatabaseRow()]
        public DateTime UploadDate
        {
            get { return uploadDate; }
            set { uploadDate = value; }
        }
        [DatabaseRow()]
        public int? UploaderID
        {
            get { return uploaderID; }
            set { uploaderID = value; }
        }

    }
}
